If at any time it appears that the defendant has failed to comply with the conditions of release, that the defendant's condition has deteriorated to the point that inpatient care is required, or that the release conditions should be modified, the court may, after a hearing, modify the release conditions or order the defendant returned to the Department of Mental Health and Mental Retardation for further treatment. All such hearings shall be preceded by notice to the department and to the parties required to be notified in Section 15-16-63. All such modifications and orders shall be guided by the standard of whether such modifications and orders are necessary to ensure that the defendant does not pose a real and present threat of substantial harm to himself or to others.