Can I unlock a pay-as-you-go iPhone?

I brought my iPhone 5 unlocked from Apple and used a pay-as-you-go SIM from 02. Did my phone lock onto it or can I still change network (to Giffgaff?) My phone isn't registered with Apple if that helps.

Added (1). Sorry. I just found out that you don't need to unlock when moving from O2 to Giffgaff since the use the same signal. But I was wondering, can I transfer my credit?

If you got the phone from apple then I'm pretty sure the phone is unlocked to any network.

It is true that you don't need to unlock your iPhone to transfer network from O2 to giffgaff, as giffgaff works on the O2 network. However, I don't think your iPhone will have locked to the first network that it was used on, so it should still be unlocked anyway. I have an unlocked iPhone which was first used on the 3 network, but has been used on several other networks since then. As for your credit; no you can't transfer the credit that is on your O2 sim, to your giffgaff sim. You will need to use up your O2 credit, otherwise you will just lose it.

Incidentally, when you put your giffgaff sim into the iPhone, the phone will still show up as being on O2. This is because the iPhone doesn't support the carrier ID for giffgaff. It will be fully functional though, with all your calls, texts, and data working fine. If they do not work, simply add the carrier settings to the phone using the links on the giffgaff website. The page below gives you all the settings you need, including a helpful video.

fgaff.com/t5/Settings-for-your-device/How-to-giffgaff-iPhones-all-iOS-versions/ta-p/3522027

You should be fine.
If it was bought as 'unlocked' it is truly worldwide SIM unlocked.
Unlocked from O2, etc is only unlocked to UK networks, still needs unlocking to world

It is only a 'normal' iPhone (apple or network) that locks to the 1st network SIM that is put in it - unlocked from apple should be fine.

Just put a different (not GiffGaff - which is O2 by another name) SIM in there- try a friends from another network - it will go activating and then say OK.