Not sure this is your problem, but I did have a problem with the buttons on my remote. If it only happens with one remote and not both and the lock and unlock work with the button inside the car, then maybe this will apply to you.
The buttons on the remote basically have a silver cap over some gold/exposed traces on the little circuit board. The cap for each button is not adhered to the circuit board, but rather, the rubbery membrane that sits above each switch.
Carefully separate the remote as if you were going to remove the battery and look at the buttons on the other side. Check to see if the silver caps are nicely aligned. The more used the button, the more likely it might have moved. If this is what you see, then that is your problem.
To fix mine, I pulled the silver cap off of the rubbery button and positioned over the circuit board and put a strip of scotch tape over it. Used a sliver of tape for each button as to not interfere with the other buttons. Make sure they are exactly centered. The tape will keep it from moving around.
I did this fix years ago and didn't have any trouble until the 2nd remote started to do the same thing. Same fix applied and both remotes work perfectly.
Hopefully that was your problem.