UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZvQ/P4FYzsCVdPWrhnP8YqFveWN5zZqk08BVqeBvhZU='
WHERE
key_id = '95660609e4a5e301d3c53b525aa37b59b9c42eaf238bcffaa6866efdb7e1e8be'
AND (
token = 'ZvQ/P4FYzsCVdPWrhnP8YqFveWN5zZqk08BVqeBvhZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)