notestockの末代サーバーメディアURLを一括置換できた。
UPDATE
note
SET
other = note.other::JSONB || JSON_BUILD_OBJECT(
'attachment', (REPLACE(note.other->>'attachment','mstdn.maud.io/system/','media-mstdn.maud.io/'))::JSONB
)::JSONB
FROM user
WHERE user.usn = note.usn
AND user.subject LIKE '%mstdn.maud.io'
AND note.other->>'attachment' LIKE '%mstdn.maud.io/system/%'