Buy it. Take it into a 'private' mobile retailer, and see if they'll unlock it.
There are also listings on eBay that will allow you to send the phone to them and unlock it, and they'll send it back (usually 2 days) for £10.
I wouldn't unlock it to Virgin tho. Service settings are hard to input/setup.