Catalyzes the conversion of methylglyoxal (MG) or glyoxal (GO) to D-lactate or glycolic acid respectively in a single glutathione (GSH)-independent step. May play a role in detoxifying endogenously produced glyoxals. Involved in protection against glyoxal-induced cell death. Protects dopaminergic neurons from glyoxal-dependent neuronal degeneration. H2O + methylglyoxal = (R)-lactate + H(+) kcat is 60.0 min(-1) with methylglyoxal as substrate and 146.4 min(-1) with glyoxal as substrate. Expressed in various tissues, including pharyngeal muscles, pharynx-intestinal valve, ventral nerve cord, spermatheca, rectal gland, inner labial (IL) cells of head neurons, phasmid (PHA/PHB) neurons in tail and supporting sheath/socket cells, as well as in head mesodermal cells (HMC), excretory canals and coelomocytes. Induced by DAF-16 during starvation as well as in the dauer stage. Belongs to the peptidase C56 family. DJ-1 subfamily.