I think this conversation might best start with WHY you want to do this.
Updating all records but locked ones is a weird requirement. You'll have to update the locked ones eventually, right?
Also asking why you have another transaction that is locking rows for so long you want to skip them may be helpful thing.
It just kinda sounds like you are trying to work around a larger problem by doing this, and may be creating more headaches for yourself in doing so.