Acquire a lock on invoice row to avoid race condition issue when processing it