SQL update a table with a foreign key
If you are doing a 1 time fix, drop the constraint, UPDATE and then add the constraint back.
If you need to do this as part of the application, insert one category row, update the sub-categories row, and then delete original category row.
You need to drop the constraints, update the values, and then re-add the constraints.