UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uzGWupT3tzWHrq0XD/lPdMgceig2hLjWegCYF6yHsCY='
WHERE
key_id = 'ac38294eebee68cf5ed9f74d26cc6849626b34bc3222ab0cdfc862c164cbfc84'
AND (
token = 'uzGWupT3tzWHrq0XD/lPdMgceig2hLjWegCYF6yHsCY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)