chances are the issue is linked. have you got a spare key? could be that your unlock button on the fob is sticking?
but that said, sometimes I unlock mine.. and I know ive got a dodgy door lock module, so sometimes is locks and unlocks sometimes it doesn't, whenever it pleases lol but when it doesn't unlock with the fob I have to use the key, and sometimes is drops the drivers window. I'm not sure but maybe it drops the passenger too (3 door) cant remember now. so maybe you have a dodgy door lock module too?
the next time yours doesn't lock.. check to see which door/doors is has and hasn't locked.