"hatch locked"... is this an Avant?? The key should open the hatch regardless. The gas cap door may have to be accessed from under the trim. In the sedan I think you just get inside the trunk and release the pin manually. This override should be in the owner's manual, I hope. David G.