For the first one, just place a hidden character on the door and remove the warp. Then write a script that will open the door, have the player walk forward, and then warp. Then set up a script that will check your player for the key, using the check item command, and if he has it, it will jump to the first script. If not, it just says that the door is locked.
The second one is a little more complicated. You can use flags or vars, though vars will simplify it. First, find a tutorial or figure out how to make a mart in the first place. Now, make several different mart scripts with the mart you want for each point in the story. Put all of these marts as differet dynamic offsets in your script.
Now, I'm going to use vars for this explanation, place a script or add to a script at key points in the story that will set a specific var, let's say 0x5000 +1 at each event.
Then, go back to your old script and using the compare comand, check your var for the different values and have it jump to the different mart offsets based on the value in the var 5000.