get the fastboot version of your choice here: https://xiaomifirmwareupdater.com/miui/sweet/
extract the fastboot archive (.tar.gz -> .gz -> extracted files) to some temp dir.
install mi flash tool, make sure you have an adb driver installed that recognizes the phone, mi flash tool can install them from the menu, or you can install them manually from the mi flash tool subdir. it's just so the computer and mi flash detects your phone for fastboot.
mi flash tool is a kinky app it might nag at startup for a missing "log" or "logs" dir in it's program folder. if it does so, create such folder.
after all that, select the fastboot rom from the previous extraction dir (flash_all.bat should be there). be careful at the bottom right: select clean all, not clean and lock. otherwise it gets locked again. then flash, it takes a while and it will maybe show you an error but it's normal if you deselect "lock".
Or you can simply run one of those Batch file (according to your need) directly once you connect your phone to PC in Fastboot mode. I use this method only.