Every snake owner should know this, not only for substrate stuck in mouth, but for general mouth inspections.
hold snake firmly with hand at base of skull, using free hand, use a Q-Tip, to gently open the snakes mouth.
It is easier if youu have an extra set of hands, especially with bigr snakes.
Hope this helps