It should be opened to start with, and locked after you go through the cave. AFAIK there isn't another trigger to seal the cave.