UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IXfMqlH4gNku8qBX5Yb+3C0ChrbANd+u/UsfDj7V4xM=' 
WHERE 
  key_id = 'f9eac29fbd74dad32faf8c46858bcdecdf5f50d4ede28bf79c9541cc05d2e639' 
  AND (
    token = 'IXfMqlH4gNku8qBX5Yb+3C0ChrbANd+u/UsfDj7V4xM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025