Fast constrained sampling in pre-trained diffusion models