If you have comfort access, there is a replaceable battery in the fob... battery available at any place that sells watch batteries
If you dont have C/A... then get in the car, close door.. stick fob in key holder slot and push it in all the way and HOLD it in for a few moments...
this re-programs the fob to the car.. then eject it and try the locks..
have you tried your other key ???? if the above procedure does not work then you need a new fob which is covered under warranty
X1, R58 JCW, M2 in my future if planets align