We compute the two-loop QCD corrections to the neutral Higgs-boson masses in the MSSM, including the effect of non-vanishing external momenta in the self-energies. We obtain corrections of O(alpha_t*alpha_s) and O(alpha*alpha_s), i.e., all two-loop corrections that involve the strong gauge coupling when the only non-vanishing Yukawa coupling is the top one. We adopt either the DRbar renormalization scheme or a mixed OS-DRbar scheme where the top/stop parameters are renormalized on-shell. We compare our results with those of earlier calculations, pointing out an inconsistency in a recent result obtained in the mixed OS-DRbar scheme. The numerical impact of the new corrections on the prediction for the lightest-scalar mass is moderate, but already comparable to the accuracy of the Higgs-mass measurement at the LHC.