OK. No problem. It was just an idea.
-Do you mean this site?
https://en.miui.com/download-333.html
-I think this site is better because here I can find all released updates not just one. Hash file is another thing missing on a Xiaomi website.
-I also have a TWRP backup, maybe I could try to restore a boot partition but I couldn't test the TWRP backup so I don't know if the backup is ok. And I don't want to risk bricking my phone.
1. You mean this line? fastboot %* oem lock ||
@ECHO "lock error" & exit /B 1
2. Isn't it enough to delete flash_all_lock.bat
3. I read somewhere(maybe here) that MiFlash is not always reliable, it's better to flash stock rom with a bat file(I don't know which one to run).