H'mm - I phoned Orange CS on exactly this issue, and they told me that to unlock a phone that's still under contract, you have to pay the entire outstanding contract-rental upfront (eg 12 x £12.99 if you've only just taken an Everytime 20 contract), and then pay a £20 admin fee on top of that.
Of course, you're then not charged any line rental for the rest of your contract, having paid it all up-front, and you just get billed for the calls.
Oh yes, and you also have to had had the contract for more than 14 days (probably due to their returns policy)
Presumably if your contract has expired then they just charge the £20 admin fee.