try this
Originally Posted by
[NUT] 
first of all, boot your phone and connect it to usb. Then run adb devices in a CMD window. Note down the serial, you will need it.
Okay, in the flashtool folder, check if
[FLASHTOOL FOLDER]/custom/mydevices/[DEVICE SERIAL]/ulcode.txt
exists.
If not, create the folders along the way there and then use notepad or something very lightweight to create the ulcode.txt. Put in the code, be sure to enter the code without the 0x, so just the code as it came from Sony. Save the file and start FlashTool.
Now the BLU button should offer to unlock again, but there is a difference: it will now use the serial and code to wipe the lock using the FT relock/unlock method. Without that file in place it will use the fastboot method.
worked for me!