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: update_token.rb
    path of file: ./repos/kontena/server/app/mutations/host_nodes
    
    the code of the file until where you have to start completion: require_relative 'common'

module HostNodes
  class UpdateToken < Mutations::Command
    include Common

    required do
      model :host_node
    end

    optiona
    
    def execute
      self.update_token(self.host_node)
      self.reset_node_connection(self.host_node) if self.reset_connection

      unless self.host_node.save
        self.host_node.errors.each do |key, message|
          add_error(key, :invalid, message)
        end
      end