Dynamic Algorithms for Classes of Constraint Satisfaction Problems