UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SOabTq/IIUQwn2kwS0acsrYusgMYvFZ1LeOf0n7FyUY='
WHERE
key_id = '1267d98c54f0428ee6099353f05ca09d47bb41d711f428fda285289712709a35'
AND (
token = 'SOabTq/IIUQwn2kwS0acsrYusgMYvFZ1LeOf0n7FyUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)