Hi - the value of [edx] can definitely be changed by an external agent between 'MOV eax, [edx]' and 'AND [edx], ecx' (with or without 'LOCK').
Memory ordering is a complex topic, one is strongly advised to read about before implementing similar constructions, mainly because many seemingly natural assumptions don't work in practice. Intel SDM Vol 3A, Chapter8. If you have not yet.
Now, IFF you need to have the value of [edx] before or after applying 'AND' you do need a loop with CMPXCHG as you have shown, otherwise just LOCK AND works to perform operation properly, and ensures proper prior memory operations serialization.