My Redmi Note 5 had this problem after latest MIUI update last week. It was bought on Aliexpress and had global rom on a chinese phone with locked bootloader. It gave some annoying warnings for a while, but these went away a few months ago, and I forgot about it. Then it stopped working completely.
I have managed to get it working after some investigation, and present the results in case people come here before trying all sorts of random stuff. I needed to replace the global ROM with a Chinese version. After that you can unlock the Bootloader & reflash if you like.
1. Unlocking the bootloader looks easy enough, but you need to register your mi account with the phone before the problem occurs. If you think your device might have the problem get it all ready, even if you don't want to unlock (just in case.
2. It is possible to flash a recovery rom with miflashpro without unlocking, but the replacement ROM must be at least as new as the old one. As you will most likely have the latest global ROM and the equivalent Chinese ROM is considered to be older it doesn't work. Maybe it works if you wait until a new Chinese ROM comes out. I didn't wait, so I can't promise it works.
3. Take the back off and use Testpoints mode. The vendor will offer to let you use their account with EDL permission via teamview, but I didn't like that option. However the QFIL program with QPST doesn't require special permissions. THIS WORKS.
Of course the end result is that you will end up with a Chinese language phone. I cleared data and reflashed with a standard Chinese recovery ROM just in case, and then I had to set up WIFI and log in with the same xiaomi account to get to the next step where I could change base language to English. I read Chinese well enough, but you might be able to find someone to help you.
I have chosen to keep the Chinese ROM as I need to keep the BL locked. But I have bound it so that I can unlock when I need to in the future.
Taking the back off is easy enough, but ended up with a small amount of cosmetic damage, and probably it is slightly less waterproof.
I hope this is helpful.
I like the phone. It is a good compromise between cost and performance. I am happy to have it working again.