We compute the anharmonic shift of the phonon frequencies in MgB2, using density functional theory. We explicitly take into account the scattering between different phonon modes at different q points in the Brillouin zone. The shift of the E-2g mode at the Gamma point is only +5% of the harmonic frequency, therefore questioning the accepted explanation of the anomalous isotope effect on the critical temperature. This result comes from the cancellation between the contributions of the four- and three-phonon scattering, respectively, +10% and -5%. A similar shift is predicted at the A point, in agreement with inelastic x-ray scattering phonon-dispersion measurements.