To jest rzecz CTE (ale nie wiem jak zapakować to w przygotowaną rzecz w Javie)
WITH src AS (
UPDATE serial_rate
SET rate = 22.53, serial_key = '0002'
WHERE serial_key = '002' AND id = '01'
RETURNING *
)
UPDATE serial_table dst
SET serial_key = src.serial_key
FROM src
-- WHERE dst.id = src.id AND dst.serial_key = '002'
WHERE dst.id = '01' AND dst.serial_key = '002'
;