if a machine is rated 500 watts. That means, if it runs for an hour, it will consume 500 watts.
500 watts for 1 hour is 500 Watt hours. Watt is power = energy / time.
Anwer to OP: it depends on the energy cost vs mining earnings. Right now it's probably better to sell your excess.