This has happened to a handful of customers who have all had one thing in common - the phones have been "rooted".
By rooting a handset the owner has removed some of the restrictions on the phone, which allows the owner to install whichever software of the phone that they wish. Unfortunately this has caused some issues when an unlock code has been entered.
It is easily rectified by reinstalling the original operating system that the phone was supplied with, then applying the unlock code and the phone should be unlocked, truly, successfully.
You can then reinstall the software you had on the phone before attempting the unlock and continue using the phone as you wish.