UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/lNesPseQ+J+LcGkTeqaZL0EEC6La0amqJSv9kUvlWQ='
WHERE
key_id = '7052ad7799b45c4f8c30b6ebe5e4b75fbf6494f38405db6645838e6db4f1a2b5'
AND (
token = '/lNesPseQ+J+LcGkTeqaZL0EEC6La0amqJSv9kUvlWQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)