you can achieve the solution 2 way
1.
whileselectforUpdate InventTransferLine
notexists inventTransOrigin
where InventTransferLine.InventTransID == inventTransOrigin.InventTransId
&& InventTransferLine.TransferId == InventTransferTable.TransferId
2.
whileselectforUpdate InventTransferLine
join inventTransOrigin
where InventTransferLine.InventTransID != inventTransOrigin.InventTransId
&& InventTransferLine.TransferId != InventTransferTable.TransferId