How to execute commands on Arduino (via PC) without touching the current sketch?
The simple thing would be for your sketch to read from the serial port continuously. If it finds something it stores it and when a newline arrives it sees if that happens to be a password known only to you. So, for example, all you would have to do is plug in the USB cable, activate the Serial Monitor on your PC, type swordfish and the servo opens the box.

You would need to allow for garbage arriving, so make sure that you discard input if it exceeds the size of the buffer you allocate for this purpose.




  I have been told that the power to the Arduino should be disconnected before uploading new sketches (not sure why or if this is true).


I don't see how that can be true as you have to reapply power to upload the sketch. I never do that.




  Is it possible to execute code "command prompt" style?


No, you upload compiled code.




  Or can I somehow detect from within the sketch code that there is a USB connection, and have that trigger the unlock?


Then all the person you give the box to has to notice the USB port, plug something in, and it unlocks. I think not.



An even simpler solution would be to have two locations that unlock the box. For example, your kitchen could be one, so to unlock it you just take the box to your kitchen. The other location would be the "real" one that you want your friend to have to find. All the stuff about "you are 200 km from your destination" would of course refer to the real destination. You just make the code check that if it happens to find itself in your kitchen it unlocks the box.