update users u set u.balance=u.balance-p.cash inner join pays p on p.mid=u.id WHERE p.category=114 and p.type=10 and p.time > unix_timestamp()+60 and u.mid=0;
delete from pays where type=10 and category=114 and time > unix_timestamp()+60;
Наверное так.
Только для начала советую сделать БЕКАП
Ошибка выполнение update users u set u.balance=u.balance-p.cash inner join pays p on p.mid=u.id WHERE p.category=114 and p.type=10 and p.time > unix_timestamp()+60 and u.mid=0;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'inner join pays p on p.mid=u.id WHERE p.category=114 and p.type=10 and p.time > '
mysql Ver 14.14 Distrib 5.1.56, for portbld-freebsd8.2 (amd64) using 5.2