if (tokenParam == null) {
token = lazyRandomToken.get();
} else if (memcache.load(new Key(TOKEN, tokenParam)) != null) {
token = tokenParam;
} else {
throw new BadRequestException("Invalid token");
}
// For safety we truncate all string fields so that an attacker can't blow out our memcache.
Map<String, Object> params = new HashMap<>();
params.put("status", status);
params.put("sleepSeconds", sleepSeconds);