To keep the "twist" in the cheese straws, it is essential that they be very cold when they go into a very hot oven.
Thaw puff pastry according to package instructions, just until it is soft enough to cut. (This should take about 20 to 30 minutes at room temperature). Puff pastry should still be very cold. Preheat oven to 425 degrees with two racks.
In a small bowl, mix to combine cheese and cayenne pepper. In a second small bowl, combine sesame and poppy seeds with salt, and set aside.
Arrange cold puff pastry on work surface. Cut puff pastry lengthwise into two equal 5-inch-wide halves. Brush each half with beaten egg. Sprinkle one half with cheese mixture and other half with seed mixture. Using a pastry cutter or knife, cut each half crosswise into twenty 1/2-inch strips.
Working one at a time, twist each strip into a double spiral, and transfer to parchment-lined baking sheets, 1/2 inch apart. Using your thumb, press the ends of the strips down into the parchment to prevent unraveling. Transfer to freezer, and chill until very firm, about 20 minutes. (Refrigerator may be used for chilling but will take at least twice as long.) Check dough while chilling to make sure it stays twisted.
Transfer the straws to the oven, and bake until golden, rotating baking sheets halfway through cooking time for even browning, 10 to 15 minutes. Cool the straws on a cooling rack.
The standard size for one sheet of frozen puff pastry from a grocery-store box is 10 by 10 inches. If your puff pastry is not this size, cut the width to measure 10 inches.
Straws may be made 1 day ahead and kept, in an airtight container, at room temperature.