update puzzles set motw = 'no' where motw = 'yes'
Select id from puzzles where rating_amount > 4 and id not in (SELECT puzzle_id FROM motw_history WHERE date > ( now( ) - INTERVAL 60 DAY )) order by rating_avg desc limit 1
update puzzles set motw = 'yes' where id = 784
INSERT INTO `motw_history` ( `puzzle_id` , `date` ) VALUES ('784', now())