sounds like it could be the power door lock actuator. there is a small plastic gear in there that cracks or breaks, stopping a metal rod attached to it from being able to unlock the dock. the motor will be good, just the gears are f-ed. they redesigned the door lock actuator because this is a common problem.
only thing is, it is weird both would have went out at once. did this happen at the same time or over a period of time?
anyway, my door lock did the exact thing you describe and it was the actuator.
2006 330i - Jet Black - 19" E46 M3 wheels - HR Sport - 188,000 Miles...