Optimistic locking is a technique used to prevent data conflicts in a multi-user environment. It involves checking for conflicts only at the time of update, that is, when a user tries to modify a piece of data that may have already been modified by another user. If a conflict is detected, the optimistic locking mechanism rolls back the transaction and the user has to redo their work. Therefore, option A is correct. Option B is incorrect because it contradicts the explanation given above.