If the egg was soft, or only had a very thin shell then it is highly likely that your hens will do this. It is natures way to ensure that predators aren't attracted to the nest.
It the egg had a good shell, then you have a bit more of a problem. Put a pot egg into the next box and let the hens peck and peck at it. They will get sick of pecking at an unbreakable egg, and eventually give up.
But egg eating is very difficult to berak, and some keepers will say the only way to cure egg eating is to eat the egg eater.