MT5 demo accounts only expire if there are no logins for a period of 30 days.
If there are no logins or activity on the account for 30 days, then it will expire.
The only thing required for them to remain open is that the client logs into the account at least once every 30 days
Note: If we can't find this account on Manager, this account is expired and deleted from our server to optimize the performance.

 MT5 - we cannot delete MT5 demo accounts on the hub (and historically never had the ability to). 
The best option is to hide the account from the hub