If you want to prepend every value with a zero ‘0’:
SET code = concat('0', code)
, parentcode = concat('0', code)
A better approach would probably be to select the data out of this table - adding the ‘0’ - verifying the results are what you want - then rename the existing table to yourtable_old and the new table to yourtable. If you put this inside a transaction it will insure no updates/changes/inserts are performed during your process…which really means you need to do it after hours.