If you lock the bootloader, the phone is resetting, and after that the big 2 cores it's activated again.
That's why you have bootloop again.
You shouldn't lock!!!
Just take the whole process from beginning...if you can, to make the phone ''alive''.
Happy New Year!!!
Sent from my Nexus 5X using...