Well, you could simplify this a lot with something like:

    @expires_in = @expires_in.call(self) if @expires_in.is_a?(Proc)
    @expires_in = @expires_in.to_f if @expires_in

Which is simpler, and adds the possibility to return nil in the proc to disable the expiration.