It sounds to me to be the Bowden cable that needs adjusting,time to get the door card of to have a look,another possibility would be the spring on the handle to open the door has broken and as you lock the door the handle sits out about 1/2 an inch and stops the central locking from working.do a search for bouncing locks.
My car can be a bit temperamental on the drivers side, the locking mechanism can be a bit stiff and is just enough resistance to stop the motor unlocking but works fine via the key where my hand can apply a small amount more force.
This can also happen if the door locks get out of "sync" with each other because of being not shut properly at some point or icing up. There is a procedure on the forum for resetting as I had this problem last winter.
My car lives outdoors all the time, so can freeze up !
Still at 165k miles you gotta expect that some things need abit of "help" now and again.
Occasionally this happens to me. I received helpful info re bowden cables, but didn't think it warranted a strip down. I then discovered that occasionally, somehow they "got out of sync", and when this happens, I go to the passenger side, press the door button down, shut the door and then lock with the fob and both lock together....Works every time...how odd.