As your contract with O2 ran its full term? If it has why not ask O2 to transfer you to Pay As You Go and keep same phone and number. If they say no just tell them you will go to another network provider.
If you wanna unlock the mobile ,
Get the unlock code here in this site mention below & unlock the mobile in easier way .
I used this site http://www.theunlocka...lock...phone/rs13wp2/ for unlocking the mobile , it provides unlock code , using that i unlocked the mobile & got nice solution.
It worked out great .