UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '81KRbUYJuEyii1/LlyNskDTt59ijgQoj7sjzn+7TcGQ='
WHERE
key_id = '72fa9124fd8eceabfc67b320a40480001364a83ed547481768d19de4714756fc'
AND (
token = '81KRbUYJuEyii1/LlyNskDTt59ijgQoj7sjzn+7TcGQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)