The power rating on the motor is the maximum power it's ABLE to deliver. It can run with LESS power output than the rating, but if you try to run it with MORE than it's rated, the motor will overheat and eventually burn out.
" 10 watts " means " 10 Joules of enrgy per second ".
If the motor is operated at its full maximum rated capacity, then
(500 joules) / (10 joules/sec) = 50 seconds