Start with great base in the closed guard, opening your knees up so that they are wide enough, but close enough in so that you aren't easy to break down forward and backward (don't just consider lateral stability here).

Now, the job of your hands is not to keep your partner from breaking you down, contrary to popular belief. Your hands are really there to prevent your partner from sitting up into you! Use them appropriately, while meanwhile using your "Old Man Herbert" posture to keep your partner from pulling you down.

Realistically, you'll end up using your hands for more than just keeping your partner from sitting up, and might even use them to keep yourself from falling, but don't try to rely on this so that your hands are free to get the guard open.