UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nC8OOh20PlqEFnDHcegVwTisXagsQe4yfhlVcraqa/k='
WHERE
key_id = '9486004f1113e0d10723bd8dfcc4bf0fb5da7e618983b43e2bf1b22182c2988e'
AND (
token = 'nC8OOh20PlqEFnDHcegVwTisXagsQe4yfhlVcraqa/k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)