you can get the unlock code once out of contract from the supplier. Your choice tho if you want to renew, or on O2 try the SIMplicity SIM only option if you are happy with your handset.
You might wanna look at a different handset though in which case, worlds your oyster.
If you don't manage to get your phone unlocked from the O2 network then you can still get a free sim with £5 free credit from http:/giffgaff-sims.co.uk/index.html
It's powered by the O2 network in the UK with unlimited internet and txts, cheapest UK mobile operator offering free same network calls and the cheapest any network call charges.
what is the model of your phone? If you need to use any other SIM to your phone, You need to unlock it. You can try getting the unlock code from www.classicunlocking.com . This iste provides accurate unlock codes at affordable cost with easy unlocking instructions too. all the best mate.