I followed these instructions:
First, you should confirm that it is possible to unlock the boot loader of your device by checking the service menu. In your device, open the dialler and enter *#*#7378423#*#* to access the service menu. If you have a tablet, click here to learn how access the service menu.
In your device, tap Service info > Configuration > Rooting Status. If Bootloader unlock allowed says Yes, then you can continue with the next step. If it says No, or if the status is missing, your device cannot be unlocked.