I was googling but I didn't find an answer for how long they will keep before you have to worry about them dying off.
I know you cannot refrigerate them so I was just curious. I can make my butterworms dormant and get greater quantities but I need to get an idea for BSFL so I can incorporate them into my dragon's diet.
Usually a couple of weeks at least. More if you can put them in a wine fridge and keep them between about 50-60f. I've kept them up to a month before they start to morph into flies which are also a great treat. They're slow moving and easy to catch if they get out of the container.
I've stored them for months. I bought some back in October of 2016. I had too many. I had 2 containers that I had just left in the basement and forgotten about. I went a opened them about a week ago (Feb 10ish 2017), and the soil was totally dried out and yes there were some dead ones, but overall I'd say that at least 1/2 if not 3/4 were still alive. I sifted out all the soil and rinsed them with water then put them in with some cooked butternut squash and bread and they are doing just fine now and are growing.