Sounds like they have lost their sync with the car, try the following sync methods on your keys, one immediately after the other so they sync as a pair.
BMW Z4 - Key Remote Programming
Three methods to try:
Method 1:
1. Working from within the vehicle and with the doors shut
2. Turn ignition to position 1 and back to off within 5 seconds.
3. Remove the key from ignition and press and hold the unlock button for 15 seconds during this time press the key lock button 3 times within 5 seconds.
4. Release both buttons.
5. Doors will lock and unlock to show correct programming has occurred.
Method 2:
To do this procedure you need to have one working key and one key that needs to be programmed.
1) Get in and close all doors.
2) Turn on the ignition and turn off quickly. (No more than 5 seconds) to start the process. Next action must take place within 30 seconds.
3) Remove the 1st key.
4) Hold the key up near your left shoulder (this is so it is closer to the remote receiver antenna.
5) Hold down the unlock button and press the lock button 3 times. Release the unlock button and the doors lock which confirms the operation.
6) Quickly repeat steps 4 & 5 for key #2 etc.
If it does not work, try doing the keys in opposite order. Key 2 then key 1, vs 1 then 2.
Method 3:
Alternate if you do not have a working remote
1. Turn key to position 1 five times very quickly 2. Remove key 3. Hold unlock button then press lock button 3 times, release unlock button.
4. If you have another key do the same button pressing within 30 seconds 5. Turn on ignition to finalise.
PLEASE NOTE: This programming procedure programs the remote control part of the key. Any transponder chip for the immobiliser (starting of car) will not be programmed and must be done by a specialist.