UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'axogGm6XZ9+e/jXGlujNDqPXILB4haazi2LJLlIL220='
WHERE
key_id = '8a815d672087401aee0ea648cf54fe5ce08ccede1eaef075ce4d185f11500b34'
AND (
token = 'axogGm6XZ9+e/jXGlujNDqPXILB4haazi2LJLlIL220='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)