Order modification: how does it work?

I have a couple of questions about order modification requests.

Example: I place a Limit Buy order for 1,000 shares of US stock for INTC ticker.
Say, 20 milliseconds later half of that order gets filled, so my position is 500 shares.
The other half of the order is still not filled.
The NBBO spread changes, and the remaining 500 shares cannot be filled at the current order’s limit price (or better, because it’s a Limit order).
I want to modify the order and change the price and send the API request. The order modification request reaches Alpaca before the NBBO price changes again, and before the other half of the standing order gets filled.
The modified order, now for 500 shares, contains the Limit price which is marketable, so the new/modified order can easily get filled.

What will happen in this situation?

Will my modified order get rejected?
Will it replace the standing order and get a chance to get filled at the modified price?

This is the type of situation which is extremely hard to reproduce, hence the question.

Please advise.

I will rephrase my question so as to make it shorter, hoping to get a response:

If a Limit order’s Limit price is modified after the order is partially (but not yet fully) filled, will this order modification be accepted or rejected?