Lipase-mediated hydrolysis and esterification