This will describe the lock latch modification only and will not address the door warping issue further.
I noticed the glove box door on my 240Z would not always stay latched. The first thing I tried was to slide the lock mechanism fore and aft after loosening the two screws that hold it on as they are in long slots. I had previously modified the latch on the door to stay in position better using a cotter pin (see part 1 of 2 blog post on this) but the half with the locking mechanism needed work so that the latch would hit at the right angle. I did this in two steps. To do the first bending operation I pushed in the lock with the key so the vise grips wouldn't hit where the key goes in and used an aluminum rod 3/16" in diameter as a fulcrum.
Step 1: (click for animation)
Step 2: (click for animation)
The second bending operation used vise grips on both sides of the very end of the tang to slightly turn the tang so the latch would hit at a better angle:
The door closes every time now with a firm click and
stays closed. Be sure to click on the last two pictures below to see the short movies showing the latch before/after action.
Latch tang result from step 1 and step 2:
Closing action before: ________Closing action after modification (click either for animation):