I think this one is a good candidate for a CTE, to avoid duplication, sth like:
WITH previously_current_quotas AS (
  this long query here, maybe also needs to consider public_display
), new_inserted_quotas AS (
  INSERT INTO trade restrictions SELECT FROM previously_current_quotas
)
UPDATE previously_current_quotas