I isolatet the problem from a much more complex query. Here the test scenario
DROP TABLE test; CREATE TABLE test ( id integer, description varchar(100)
You update two rows in your UPDATE query, add a WHERE clause to restrict the rows affected.
UPDATE
WHERE
UPDATE test SET description = 'test' WHERE id = 1 RETURNING id
to return a single row.