Fixes #1105 - Add in retry logic to acquiring a database lock for modifying the Order to avoid any possibility for an infinite loop. Also treat null Orders the same as NullOrderImpl when attempting to acquire the lock