fix infinity loop by randomkey if the slave only has expired key.