If I was the parent: I'd rush my child to the restroom and give him the time to get into the cubicle and clean himself up - unless if the child's under the age of 3, then I guess it's all me, babyyyy ;]
If I was the cashier: I'd ask the parent if everything is okay, and keep it a low-profile situation. If the parent is needing some help with the situation at hand, I'd make sure that the restroom is cleared or just not so busy. I'd ask if they needed anything else such as more toilet rolls, any wet wipes, etc, etc.