You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: track_usage_service.rb
    path of file: ./repos/gitlabhq/app/services/clusters/agent_tokens
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Clusters
  module AgentTokens
    class TrackUsageService
      # The `UPDATE_USED_COLUMN_EVERY` defines how often the token DB entry can be updated
      UPDATE_USED_COLUMN_EVERY = (40.minutes..5
    
      def can_update_track_values?
        # Use a random threshold to prevent beating DB updates.
        last_used_at_max_age = Random.rand(UPDATE_USED_COLUMN_EVERY)

        real_last_used_at = token.read_attribute(:last_used_at)

        # Handle too many updates from high token traffic
        real_last_used_at.nil? ||
          (Time.current - real_last_used_at) >= last_used_at_max_age
      end