UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '950zNenJRkrvYRrWUG7LFyFgitOcJ6wuPld7G/HotFE='
WHERE
key_id = '4add0762cb6eec25580dc4b74edd19b47a9e67178649985a3d8d211ab33df59f'
AND (
token = '950zNenJRkrvYRrWUG7LFyFgitOcJ6wuPld7G/HotFE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)