I took a 3G out on contract in Jul 08. In Jul 09 I bought a PAYG 3GS from Apple and activated it with my contract SIM. O2 have unlocked the phone. I think the significant thing is what SIM card was the phone activated with not what do you use in it now.
I did the same except the Apple Store insisted on activating it in store with the PAYG sim.
It's been with the iPhone contract sim ever since and O2 have unlocked it for me.