UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NHGHuCq8iTXOL9QAgfl6WcL7HBl2MCoAP0RjuSFIy98='
WHERE
key_id = '63ad10593b11f37e62f489d1309783eb541df0528adc180093d3bf2c9ef3a92d'
AND (
token = 'NHGHuCq8iTXOL9QAgfl6WcL7HBl2MCoAP0RjuSFIy98='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)