Apply in a CSV file to multiple databases
Load the CSV file into a "staging" table. From there you can easily do the UPDATE/INSERT/DELETE in a single statement for each one 

Something along the lines:

update real_table
  set ...
where exists (select 1 from staging_table where ...)

insert into ...
select 
from stage_table
  left join real_table 
where real_table.some_col is NULL

delete real_table
where not exists (select 1 from staging_table)


Then delete the data from the staging table.

Probably the fastest way to do it. The only drawback is that you have the data for one table twice in the database (until it is deleted from the staging table).