UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x0GFbxzVwLlOwn6HRgbb7pQFT/t8J31HV08ob7VXmbI='
WHERE
key_id = '1e547b7a8ba17cb1da53dde21bea8c09b1ef90e3e73a31d0ce32b96c786a1112'
AND (
token = 'x0GFbxzVwLlOwn6HRgbb7pQFT/t8J31HV08ob7VXmbI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)