Mealies are super hard living. For 1-2 weeks they will be fine. For couple of months, then you can let them hibernate in the fridge.
The following would be best, but you can start at #3
1. Clean away the frass (feces) and dirt out as much as possible
2. If you have beetles or pupae in your worm tray, you can do a pupae harvesting and put the pupae and beetle in the beetle tray
3. Feed them grains and carrots (or other vegetables) right before you leave