UPDATE lsmd_cont_ldreg t
SET geom = ST_Multi(ST_CollectionExtract(ST_Buffer(t.geom, 0.0), 3))
FROM lsmd_cont_ldreg_err_log log
WHERE t.gid = log.bad_gid;