Postgresql update slow on a relative small/medium table
Instead of updating hundreds of row at once, which will always take sometime with that much rows
make an UPDATE TRIGGER, which automatically updates the timestamp for every row, whrn an update occurs.
CREATE OR REPLACE FUNCTION update_changetimestamp_column()
RETURNS TRIGGER AS $$
BEGIN
   NEW.last_updated = now(); 
   RETURN NEW;
END;

AND
$$ language 'plpgsql';
CREATE TRIGGER update_det_price_list_timestamp BEFORE UPDATE
ON ab FOR EACH ROW EXECUTE PROCEDURE 
update_changetimestamp_column();