Updates given entity if it is at set version using optimistic locking
Number of affected rows
Entity to save