UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'WABDo0ldEcUZp4mzno7iJSAdyzkxyw/3QsW28j4qGD4='
WHERE
key_id = '94f82e0b8d4fba11d735d4e2015fe6bd2bfde598a2b32c04c59568c698599c92'
AND (
token = 'WABDo0ldEcUZp4mzno7iJSAdyzkxyw/3QsW28j4qGD4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)