UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'sIe2hjbqJJYjctxmh5VO0wup9hSf0g2qWpIwYYsv93k='
WHERE
key_id = '03ed73f5c0d73de269d6f0cdf6d606708e8d80eb5f6d4178f2473cfea28cf779'
AND (
token = 'sIe2hjbqJJYjctxmh5VO0wup9hSf0g2qWpIwYYsv93k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)