Might seem like a micro-optimization, but also for slightly better readability, I'd rename the constant `LEGTH` to `RAW_LENGTH` (or `UNMASKED_LENGTH`), and right below it define `MASKED_LENGTH = RAW_LENGTH * 2`. Then I'd just be checking against the two constants here. Also, make it a case statement and put the more commonly expected case further up:

```ruby
case masked_token.length
when MASKED_LENGTH
  # ...
when UNMASKED_LENGTH
  # ...
else
  false
end
```