You can not change origin url for installed OOB application. Not without asking user to uninstall and re-install application from new location. It is not all that user friendly, but it is transparent to the user.
Ideally origin url should not change during life time of the application. Using server side url rewriting (maybe redirecting too) should be fine if you would like to move xap file around. If changing domain name is unavoidable you could push an update to the users that reminds them that application moved to different domain and it needs to be re-installed.