1. There's now an even easier way to root the 402 firmware that does not require you to downgrade first:
But note this post, where you have to change something in the install.bat file for it to work on the Z2:
2. It's a little more work if your bootloader is unlocked and you want to relock it before sending it to the service centre. You need to have your TA backup before doing so. If your bootloader is locked, you just have to remove root via SuperSU before sending it in for service.