UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nuf5g/Yz/cHyyDzJE9a6xbBc/mlR97JsFLSZVXIOq+A='
WHERE
key_id = '0ddf6da1ceb802a3dc39479806d26c54f9b913dc0d37aff5c52dfb17857e17cd'
AND (
token = 'nuf5g/Yz/cHyyDzJE9a6xbBc/mlR97JsFLSZVXIOq+A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)