Microgrids are power networks which may operate autonomously or in parallel with national grids and the ability to function in case of islanding events, allowing critical national infrastructures to be both more efficient and robust. Particularly at smaller scales and when relying on renewable energy, stability of microgrids is critical. In this paper we propose a token-based CDA algorithm variant which may be frequently run on resource-constrained devices to efficiently match loads and generator capacity. The new algorithm was proven theoretically that it satisfies the mutual exclusion properties, while yielding an acceptable time and message complexity of O(N) and O(logN) respectively. The algorithm should generally be compatible to microgrids supported by a hierarchical network topology where households form cluster nodes around a single smart meter-cluster head (a setup similar to the one discussed in Sect. 3).