UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'kX+Jdes/81IAjtJbIx4QVUx3Es/KYhEzn9IjLbFc6mU=' 
WHERE 
  key_id = 'da5a8cfaad421399f8a8a45e772b2d7f944c3dec7dbe8a5647f6002cb0db6a3a' 
  AND (
    token = 'kX+Jdes/81IAjtJbIx4QVUx3Es/KYhEzn9IjLbFc6mU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033