convert more backend code from cask_name to token

missed in #7673
Merge pull request #7807 from rolandwalker/cask_name_to_token

convert more backend code from `cask_name` to `token`