The kit to repair the door cylinder is about $10. My fob stopped working and I could only get in with the key so I kept a kit in my glove box since mine would fail every 6-8 months. It's got a very thin piece of pot metal that basically acts like a fuse.
X AUTOHAUX Barrel Door Lock Cylinder Repair Kit for BMW X5 E53 2000-2006
https://a.co/d/bPq6ZIh
Takes about 30-40 minutes.