UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f1bquokO+40MrFbt80i/guYzZk0HL4dguAIzvsEGPzQ='
WHERE
key_id = '324de20f9e0200bf411c2d802bd1cec64bd85dd61420d9b8ff180fa2aef3c90c'
AND (
token = 'f1bquokO+40MrFbt80i/guYzZk0HL4dguAIzvsEGPzQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)