BEGIN
declare hash2 bigint default UUID_SHORT();
START TRANSACTION;
update meta.proxy set work_status = 1, hash = hash2 where id IN (select id from meta.proxy where work_status = 0 and time < ADDTIME(now(), -400) for update skip locked) limit limit;
COMMIT;
select id, type, ip, port, login...