The standard cheese way to beat them is to use a cloudkill wand (NOT the Cloudkill spell) if you have one. Open the door, cast, close the door. The super-intelligent mind flayers can't seem to open the doors of their own lair. Like I said, it's a Camembert solution.