We present the results of high angular resolution millimeter observations of gas and dust toward G31.41+0.31 and G24.78+0.08, two high-mass star forming regions where four rotating massive toroids have been previously detected. The CH
3CN (12-11) emission of the toroids in G31.41+0.31 and core A1 in G24.78+0.08 has been modeled assuming that it arises from a disk-like structure seen edge-on, with a radial velocity field. For G31.41+0.31 the model properly fits the data for a velocity v
rot≃1.7km/s at the outer radius R
out≃13400AU and an inner radius R
inn≃1340AU, while for core A1 in G24.78+0.08 the best fit is obtained for v
rot≃2.0km/s at R
out≃7700AU and R
inn≃2300AU. Unlike the rotating disks detected around less luminous stars, these toroids are not undergoing Keplerian rotation. From the modeling itself, however, it is not possible to distinguish between constant rotation or constant angular velocity, since both velocity fields suitably fit the data. The best fit models have been computed adopting a temperature gradient of the type T∝R
–3/4, with a temperature at the outer radius T
out≃100K for both cores. The M
dyn needed for equilibrium derived from the models is much smaller than the mass of the cores, suggesting that such toroids are unstable and undergoing gravitational collapse. The collapse is also supported by the CH
313CN or CH
3CN line width measured in the cores, which increases toward the center of the toroids. The estimates of v
inf and {dot}(M)
acc are ∼2km/s and ∼3x10
–2M
☉/yr for G31.41+0.31, and ∼1.2km/s and ∼9x10
–3M
☉/yr for G24.78+0.08 A1. Such large accretion rates could weaken the effect of stellar winds and radiation pressure and allow further accretion on the star. The values of T
rot and N
CH3
CN, derived by means of the RD method, for both G31.41+0.31 and the sum of cores A1 and A2 (core A of Codella et al.,
1997A&A...325..282C) in G24.78+0.08 are in the range 132-164K and 2-8x10
16cm
–2. For G31.41+0.31, the most plausible explanation for the apparent toroidal morphology seen in the lower K transitions of CH
3CN (12-11) is self-absorption, which is caused by the high optical depth and temperature gradient in the core.