How do metals split the oxygen double bond during corrosion? For a metal like $\ce{Mg}$ to corrode into $\ce{MgO}$, the double bond in $\ce{O2}$ must break. Since the dissociation energy of $\ce{O2}$ is 500 kJ/mol, using estimates from the Boltzmann distribution, it looks like there would not be any $\ce{O2}$ molecules in the entire atmosphere  with enough energy to break this bond at room temperature:
$$\text{Fraction of $\ce{O2}$ with at least $\pu{500 kJ}$ energy} \approx \mathrm e^\left(\dfrac{-500\,000\ \mathrm{J/mol}}{298\ \mathrm K(8.3145\ \mathrm{J/(mol\ K)})}\right) \lt 10^{-261}.$$

But my understanding is that $\ce{MgO}$ does form at room temperature. In fact, it seems that even stable $\ce{Pt}$ can break the $\ce{O2}$ bond at room temperature (for example in the context of catalyzing the ignition of hydrogen).

It seems that something like this must be happening: an $\ce{O2}$ molecule collides with $\ce{Mg}$ metal and gets stuck onto the surface, temporarily forming $\ce{MgO2}$. And once this bond is formed, the remaining bond between the two oxygen atoms suddenly becomes easy to break, and one of the oxygen atoms falls off and bonds with a different $\ce{Mg}$ atom. Is this the case? 

I'd like to understand this mechanism better. How weak does the $\ce{O2}$ bond become after latching onto magnesium, and why does it become weaker? Why are metals able to split the $\ce{O2}$ bond this way, compared to other materials like hydrocarbons?
The corrosion of metals like iron is essentially an electrochemical process. 

In corrosion, a metal is oxidised by loss of electrons to oxygen and formation of oxides. Corrosion of $\ce{Fe}$ (commonly known as rusting) occurs in presence of water and air. The chemistry of corrosion is quite complex, but it may be considered essentially as an electrochemical phenomenon. At a particular spot of an object made of iron, oxidation takes place and that spot behaves as anode and we can write the reaction.

\begin{align}
\tag{Anode}
  \ce{2Fe (s) &amp;-&gt; 2 Fe^{2+} + 4 e-} &amp;
  E^\circ_{\ce{Fe^{2+}/Fe}} &amp;= \pu{– 0.44 V}
\end{align} 

Electrons released at the anodic spot move through the metal and go to another spot on the metal and reduce oxygen in presence of $\ce{H+}$ (which is believed to be available from $\ce{H2CO3}$ formed due to dissolution of carbon dioxide from air into water. Hydrogen ions in water may also be available due to dissolution of other acidic oxides from the atmosphere). This spot behaves as cathode with the reaction

\begin{align}
\tag{Cathode}
  \ce{O2(g) + 4 H+(aq) + 4 e- &amp;-&gt; 2 H2O (l)} &amp;
  E^\circ_{\ce{H^+/O2/H2O}} &amp;= \pu{1.23 V}
\end{align}

The overall reaction being:

\begin{align}
  \ce{2Fe(s) + O2(g) + 4H+(aq) &amp;-&gt; 2Fe^{+2}(aq) + 2 H2O (l)} &amp;
  E^\circ_{\text{cell}} &amp;= \pu{1.67 V}
\end{align}

The ferrous ions are further oxidised by atmospheric oxygen to ferric ions which come out as rust in the form of hydrated ferric oxide $\ce{(Fe2O3. x H2O)}$ and with further production of hydrogen ions.