Worms in lizards are really common, it's pretty terribly irresponsible to sell them like that, with such an obvious infestation, but unfortunately it's very common. Panacur should clear things up nicely, you should be able to get it cheaply from the vet. Keep whatever the lizards are in immaculately clean throughout treatment to prevent reinfestation and keep in mind that some types of worms will readily spread to your other animals and yourself.
This is a warning to check animals carefully before buying them and if possible look at a fresh ****. I once bought a bluetongue which seemed fine, but while in quaranteen passed a turd full of worms, much to my disgust. Panacur fixed this up although the lizard spent an extended period in quaranteen. Incidentally, this lizard was actually gravid at the time and all the babies were healthy.