AuthToken: improve query and simplify code

Signed-off-by: Rémi Duraffort <remi.duraffort@linaro.org>
15 jobs for simplify in 10 minutes and 33 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Test
passed #53356
amd64
dispatcher-debian-10

00:02:48

passed #53354
amd64
dispatcher-debian-9

00:03:08

passed #53357
amd64
server-debian-10

00:02:46

passed #53355
amd64
server-debian-9

00:02:27

 
  Analyze
passed #53359
amd64
black

00:00:28

passed #53361
amd64
code_quality

00:00:22

passed #53360
amd64
codestyle

00:00:33

passed #53363
amd64
job-schema

00:00:39

passed #53362
amd64
pylint

00:02:16

passed #53358
amd64-dind allowed to fail
sast

00:01:25

 
  Build
passed #53366
amd64
amd64/pkg-debian-10

00:01:14

passed #53365
amd64
amd64/pkg-debian-9

00:01:40

passed #53364
amd64
doc

00:01:11

 
  Docker
passed #53367
amd64-dind
amd64/lava-dispatcher

00:03:09

passed #53368
amd64-dind
amd64/lava-server

00:03:24