Search for time modulations in the decay rate of $^40$K and $^232$Th