You cant brick your smartphone without unlocking the bootloader. And without unlocking you bootloader, you cant lose warranty. And you only have to unlock your bootloader, if you want to install a custom rom, like Cyanogenmod (LineageOS). But yeah.... due sonys "good" community politics, there are nearly no custom roms for this device.
If you want to install an official rom, also if its modified, you dont have to unlock the bootloader.
Unfortunately, I dont know any "official" method to install an older version of this OS. I only know the way with the flashtool: http://www.flashtool.net/index.php.
This program has a section, where you can download ALL roms from ALL sony devices and afterwards flash it.
Here is a good tutorial: http://www.xperiablog.net/2016/03/12/install-xperia-marshmallow-using-flashtool-and-xperifirm-guide/. You can use this tutorial 1:1 for your device and the needed Marshmallow version. Just look for your device and download the needed version.
Make a backup of your files from your internal sd card and your smartphone apps. Apps will be deleted and if you hit the "wrong" button, you could also accidently format your internal sd card.
If you have any questions, feel free to ask!