UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3B+Pd5IGZ8tdW0Eg9oEf0trtjkDWT9YmXdy5KnGxkFI='
WHERE
key_id = '2fa3c7deeac88c9fd1aabe8b8106e263846b813db5486dafbfdbb23ae393d1c2'
AND (
token = '3B+Pd5IGZ8tdW0Eg9oEf0trtjkDWT9YmXdy5KnGxkFI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)