CPC values are based on an auction/bidding mechanism where advertisers can raise or lower their bids anytime.
This also means that CPC values can change at any point in time.
Unfortunately, there is no way for Ahrefs to update our CPC for the vast 9+ billion keywords every single month (we do once in a few months) and the number that you see in Ahrefs can be treated as the best average.
It is also important to note that the most accurate CPC values you can ever get are directly from Google Ads.
It is also most likely that other tools on the market update CPC values once in a few months, unless the tool allows you to link your Google Ads account and pull data directly from Google Ads.