Revolut Interview Question

Differences for pessimictic and optimistic lock