My horse is boarded 24/7 outside, even gets her grain outside. She also only does this when I leave her for maybe 3 minutes. I believe it was because she never was left alone when she was a baby so she is used to always having attetion when she doesn't have any. So she tends to do everything she can to get at least some kind of attention even if it's just a look.
If your mare paws when she is bored give her something to do. A toy, teachieving her a trick, etc. How often are the stabled? If they're stabled most of the time look into turning them our of giving them regular exercise or even just time to stretch their legs.
I agree with Prislis Moments my horse always did that when she was tied up and I would just say NO really loud. Just like what you would do with a child ;)
Your gelding is pawing due to natural instinct to forage for food, if you have ever watched them outside in the fall or with snow covered ground they pay to get the grass to eat. Your mare is showing impatience and generally the "Dad Voice" of No! gets the point across quickly.
I just bark at my horse and say NO! Really loudly. He usually knows it's treat time, but I try to prevent it from becoming a habit.
I know it sounds harsh, but I will smack their shoulder with my hand or if I have a whip, tap their shoulder firmly. Keep consistent and act quickly when they act up!
I give my mare a smack on the shoulder but most times I just clap or say "hey" and she stops. I've never met it escalate, she knows it's bad. (although this is not a habit for her, she rarely does it.)