UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5EV7r47GlnirhOAmMxHgP/6wFNt0DGh3YE0Pooh3Dvo='
WHERE
key_id = '98b26838aeae91ff4aaf8d727cf57b69e27dff86b3e452c8f313773246a7fc3f'
AND (
token = '5EV7r47GlnirhOAmMxHgP/6wFNt0DGh3YE0Pooh3Dvo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)