O2 has an on-line form which can be fill in and they will unlock any O2 iPhone. Even if it is still on contract. All you need some of the IMEI codes etc. I also traded in for a 4S, got my old O2 3GS unlocked and sold it to a chap in Belgium, he never had any problems registering it.