A growing body of evidence indicates that the star formation rate per unit stellar mass (sSFR) decreases with increasing mass in normal main-sequence star forming galaxies. Many processes have been advocated as responsible for such a trend (also known as mass quenching), e.g., feedback from active galactic nuclei (AGNs), and the formation of classical bulges. We determine a refined star formation versus stellar mass relation in the local Universe. To this aim we use the Halpha narrow-band imaging follow-up survey (Halpha3) of field galaxies selected from the HI Arecibo Legacy Fast ALFA Survey (ALFALFA) in the Coma and Local superclusters. By complementing this local determination with high-redshift measurements from the literature, we reconstruct the star formation history of main-sequence galaxies as a function of stellar mass from the present epoch up to z=3. In agreement with previous studies, our analysis shows that quenching mechanisms occur above a threshold stellar mass M_knee that evolves with redshift as propto (1+z)^{2}. Moreover, visual morphological classification of individual objects in our local sample reveals a sharp increase in the fraction of visually-classified strong bars with mass, hinting that strong bars may contribute to the observed downturn in the sSFR above M_knee. We test this hypothesis using a simple but physically-motivated numerical model for bar formation, finding that strong bars can rapidly quench star formation in the central few kpc of field galaxies. We conclude that strong bars contribute significantly to the red colors observed in the inner parts of massive galaxies, although additional mechanisms are likely required to quench the star formation in the outer regions of massive spiral galaxies. Intriguingly, when we extrapolate our model to higher redshifts, we successfully recover the observed redshift evolution for M_knee.