The Sony Xperia M5 is a water- and dust-resistant Android smartphone produced by Sony and released in August 2015. The M5 includes model numbers E5603, E5606, and E5653.
Did you download the update using the phone itself? If yes then try charging the phone above 50% then install the update as it tends to reject installation of updates at a low power percentage
If that fails then try getting another package of the update. Hope that will be helpful