UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NLS8/dqBAqBJ6Lu0DDAyCZqvttMFYkrw6MQwQEmgA+E='
WHERE
key_id = '6c70d35b5ea5409bb88646e50a40c982344d2ceb4306295fb2b67c200dc2c98f'
AND (
token = 'NLS8/dqBAqBJ6Lu0DDAyCZqvttMFYkrw6MQwQEmgA+E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)