UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9UIIKgNF6tYXjDvyG1+gao7IWUUYDV1JhIhvlFgvjF8='
WHERE
key_id = '924f8ffd2efceb098320823501603cf3c84dcaafbe3b24e4e86fb8885cbb5f24'
AND (
token = '9UIIKgNF6tYXjDvyG1+gao7IWUUYDV1JhIhvlFgvjF8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)