UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/uxF9ezYslgKIKKo1Q7Lk4hQ6doDMso4y8bIdiH7jag='
WHERE
key_id = '108f43d38f830e005e90b3e2cc4e91e8b36122151a20a23aa1e497df0b9c844b'
AND (
token = '/uxF9ezYslgKIKKo1Q7Lk4hQ6doDMso4y8bIdiH7jag='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)