Apart from drilling an air hole, one easy way -so you don't forget to open it occasionally- & btw, the hours would depend on how many snakes there are & how big the cooler is

- Anyway, as I was saying, one easy way is to put a small wad of tape in the opening of the cooler so it doesn't quite shut tight.
Another caution if you travel with a snake in a bag or tub only (without them also being in an insulated "cooler"): I know of someone from a previous forum, some years ago, that bagged up their favorite boa & put it under the driver's seat for a several hour trip in their truck. Unfortunately, the truck's floor conducted the heat from the engine & from the road much better than the owner realized- & since snakes cannot call out in distress, his beautiful pet died from heat stroke, in silence & right next to him, only unseen. It broke his heart & it still breaks mine to think how preventable this was.
Whether it's heat from the floor, or sun streaming in thru the windows onto a container, please never under-estimate the need to protect your snakes when traveling. You could have a vehicle break-down at any time, leaving you without heat in winter or without A/C in summer heat- either one can be deadly for an unprotected snake. Please use either an "ice chest/aka cooler" or a thick styro-foam box (you can poke an air-hole in those very easily, & you might find them cheaply for sale in thrift stores).