So i have a 03 z4 and I have a simple solution to keys locked in trunk once you have the doors open (I had AAA open mine). On the driverside open the door look in the door jam beside the lock and look for a plastic or rubber cover over a hole. Remove this cover and then remove the screw behind it but becareful not to drop inside the door (I used needlenose plires to hold the screw). After removeing the screw you can manipulate the lock from the keyhole with a flat blade screw driver, just lock and then unlock the door. This in most cases will reset the security system and then the trunk release will work