UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o3/+ZfTqyBbK17HZsipJvq7vu/u6GdbaHmjZjxRbdSo='
WHERE
key_id = '2b9fe13622e41256208998d0ce493378a8098a3e6d9acbbce0b1f6c6075f4c44'
AND (
token = 'o3/+ZfTqyBbK17HZsipJvq7vu/u6GdbaHmjZjxRbdSo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)