Study of charm mixing and CP violation with $D^0\to K^\pmπ^\mpπ^\pmπ^\mp$ decays