Context. Evolutionary models are widely used to infer the mass of stars, brown dwarfs, and giant planets. Their predictions are thought to be less reliable at young ages (< 200 Myr) and in the low-mass regime (< 1 M ). GJ 2060 AB and TWA 22 AB are two rare astrometric M-dwarf binaries respectively members of the AB Doradus (AB Dor) and Beta Pictoris (β Pic) moving groups. As their dynamical mass can be measured within a few years, they can be used to calibrate the evolutionary tracks and set new constraints on the age of young moving groups. Aims. We aim to provide the first dynamical mass measurement of GJ 2060 and a refined measurement of the total mass of TWA 22. We also aim to characterize the atmospheric properties of the individual components of GJ 2060 that can be used as inputs to the evolutionary models. Methods. We used NaCo and SPHERE observations at VLT and archival Keck/NIRC2 data to complement the astrometric monitoring of the binaries. We combined that astrometry with new HARPS radial velocities (RVs) and FEROS RVs of GJ 2060. We used a Markov Chain Monte-Carlo (MCMC) module to estimate posteriors on the orbital parameters and dynamical masses of GJ 2060 AB and TWA 22 AB from the astrometry and RVs. Complementary data obtained with the integral field spectrograph VLT/SINFONI were gathered to extract the individual near-infrared (1.1-2.5 µm) medium-resolution (R∼1500-2000) spectra of GJ 2060 A and B. We compared the spectra to those of known objects and to grids of BT-SETTL model spectra to infer the spectral type, bolometric luminosities, and temperatures of those objects. Results. We find a total mass of 0.18 ± 0.02 M for TWA 22. That mass is in good agreement with model predictions at the age of the βPic moving group. We obtain a total mass of 1.09 ± 0.10 M for GJ 2060. We estimate a spectral type of M1 ± 0.5, L/L = −1.20 ± 0.05 dex, and T eff = 3700 ± 100 K for GJ 2060 A. The B component is a M3 ± 0.5 dwarf with L/L = −1.63 ± 0.05 dex and T eff = 3400 ± 100 K. The dynamical mass of GJ 2060 AB is inconsistent with the most recent models predictions (BCAH15, PARSEC) for an ABDor age in the range 50-150 Myr. It is 10 to 20% (1-2σ, depending on the assumed age) above the models predictions, corresponding to an underestimation of 0.10 to 0.20 M . Coevality suggests a young age for the system (∼ 50 Myr) according to most evolutionary models. Conclusions. TWA 22 validates the predictions of recent evolutionary tracks at ∼20 Myr. On the other hand, we evidence a 1-2 σ mismatch between the predicted and observed mass of GJ 2060 AB. This slight departure may indicate that one of the star hosts a tight companion. Alternatively, this would confirm the models tendency to underestimate the mass of young low-mass stars.