Ciklum interview question

Optimistic vs. Pessimistic locking. Concept and examples