Maybe try this:
Originally Posted by amfractal
It was probably mine. I had the same issue and I got my code from cellunlocker.net.
I was on SlimRom and it was not working. I finally went back to the official rom for one final try and it worked.
This is what I did. I'm not sure if just trying the unlock code would've worked but I did follow these steps (it's a bit weird since you don't actually change anything, maybe it forces the phone to refresh something.)
Just make sure you are on official ROM or it won't work (I tried only the code with the SlimROM and it did not work).
After unlocking I went back to SlimRom and then CM and it was always unlocked.
1. Make sure that the phone PROMPTS for the code with a NON accepted sim card and that your IMEI is correct by dialing *#06#
a. Go to the Dial pad and dial *#197328640#
b. Please click on number  UMTS >  Debugging screen >  Phone Control >  NETWORK LOCK
c. You will see 3 options
d. Please click on number  Perso Sha256 INFO, the screen will change slightly
e. Please hit the MENU button then when the menu pops up please carefully hit BACK to return to the previous screen
f. Next Please click on number  Perso Sha256 ON, the screen will change again to a one line message
g. Restart the phone on the screen by holding the power button and click RESTART
h. When the phone prompts for the unlock code simply enter the unlock code provided to you
i. Your phone is now permanently unlocked!
I had tried two times to unlock my phone with a code I had bought online, but it wouldn't work. After doing this it worked perfectly! I also turned off GPS and Wi-Fi (for some reason they were on). I don't know if turning them off helped any, but it never hurts to try to turn them off if they are on before putting in the code. Hope this works for you!