iPhone has been updated successfully but why is it still stuck on connect to iTunes?
Those versions are no longer signed.

Apple has stopped signing iOS 10.3.1 so it will not work to downgrade to. You need to use iTunes to update back to iOS 10.3.2 and your phone will work again.