Pergunta de entrevista da empresa Weavr

what's the optimistic locking and how to implement it?