Looks like batt's OK then.
So it's looking for key 2, key three has gone missing and you have keys 4 and 5.
Does it just need telling to look for either key 4 or key 5 or either? Maybe it needs to be told to cancel key 2 or summat?
I REELY don't know, feckin electrickery, and I suspect they are all different. But I did suspect it would need some friggin around through diagnostics to make the ffin car recognisse the ffin key.
I know that BMW garages charge a king's ransom per hour, but it might be worth giving em a ring?
I do know you are fast getting into the realms of paying more for this than you paid for the car.
You need the equivalent of sierrafery on a BMW/MINI forum.
i'm having a look to see if i can find anything that might halep, but I expect you have already done this.
so bear with me as I chuck links at you, some more specific than others.
course I don't know what year the car is or if the MINI Cooper is different in any way when it comes tyo keys than the more ornery MINI
https://www.northamericanmotoring.com/forums/r50-r53-hatch-talk-2002-2006/182876-key-fob-fix.html
https://www.google.com/search?q=my+...7j33i160l2.9050j0j15&sourceid=chrome&ie=UTF-8