My chemistry book says the following:
In the metallurgy of silver and gold , the respective metal is leached with a dilute solution of $\ce{NaCN}$ in presence of $\ce{O2}$ as a result of which the following reaction takes place: $$\ce{4M + 8 NaCN + 2H2O + O2 -> 4Na[M(CN)2] + 4NaOH}$$
Here $\ce{M=Ag,Au}$. Now my question is since the complex anion $\ce{[Au(CN)2]-}$ is formed, the gold has been oxidized from its elemental state to $\ce{Au+}$ and apparently the $\ce{O2}$ has been reduced to $\ce{OH-}$. This is the place where I have some problem. In contrast to what we are taught from middle school that gold is highly resistant to oxidation by air (atmospheric oxygen), here it is clear that gold has been oxidised to $\ce{Au+}$ by air which is counter intuitive.
My Speculation
I think that when we say oxidation of gold by air does not occur it might mean that the process is very slow. I thought that the reaction is a reversible one (as in case of oxidation of gold by $\ce{HNO3}$ where $\ce{Au(NO3)3}$ is formed but the reaction is so slow and the equilibrium constant for the reaction is so slow that practically the gold remains passive to $\ce{HNO3}$ but when we add $\ce{HCl}$ due to formation of chloroauric acid the equilibrium is driven forward):
$$\ce{Au +[O]<=>Au+}$$
Under normal condition this reaction is very slow and that's why we say gold is inert. But in this case as soon as $\ce{Au+}$ is formed the $\ce{CN-}$ ligand attacks it to form the complex $\ce{[Au(CN)2]-}$ which drives the equilibrium in the forward direction by Le Chatelier's principle. But I couldn't find any such reliable resource for figuring out what exactly is going on here as any insight or if what I speculated was correct or not into the chemistry of the reaction will be gladly appreciated.