The deadlock seal was on the inside of the Pandorica, not the outside. It is easy to get into a prison, but hard to get out.
I would have thought that the Doctors enemies may have wanted easy access to him if something was wrong with their plan so would have built a simple release for the pandorica the Doctor activated it with his screwdriver. As to the knowledge of the frequency of said release button he may have worked it out before he got in the pandorica or he may have spotted it on the older sonic screwdriver when it was shown that the two were the same at different point's in it's own time stream.
But when River read what defenses the Pandorica had, she said it was protected by a deadlock seal. So I am lead to believe that when the Doctor was released from the Pandorica, he scanned it's programs while it was open, and integrated it's systems control into the Sonic Screwdriver. So the future screwdriver can have easy control over the Pandorica.