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: expirable.rb
    path of file: ./repos/devise-security/lib/devise-security/models
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

require 'devise-security/hooks/expirable'

module Devise
  module Models
    # Deactivate the account after a configurable amount of time.  To be able to
    # tell, it tracks activity about your acco
    
      def expired?
        # expired_at set (manually, via cron, etc.)
        return expired_at < Time.now.utc unless expired_at.nil?

        # if it is not set, check the last activity against configured expire_after time range
        return last_activity_at < self.class.expire_after.ago unless last_activity_at.nil?

        # if last_activity_at is nil as well, the user has to be 'fresh' and is therefore not expired
        false
      end