Hello and welcome to Android Central. The answer to your question depends on whether or not you are comfortable typing commands from the Windows Command Prompt. Can I ask why you want to lock the bootloader. I had an unlocked M8 that also had root. It was a great device and I had a blast flashing custom roms and apps.