Make CI build to use optimistic locking only on status change

Merged Kamil Trzciński requested to merge optimistic-locking-ci-status-change into master

What does this MR do?

We update Ci::Build often, what matters for us is to only lock build when there is status change.

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?