Allow session garbage collection to use an index

Performing arithmetic in the where clause prevents MySQL from using an index. The garbage collection becomes increasingly more expensive to run as traffic grows.
Merge branch 'hotfix/6106'

Close #6106
Fixes #6037
Merge pull request #6110 from hjr3/patch-1

Allow session garbage collection to use an index
Merge branch 'hotfix/6110' into develop

Forward port #6110