UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eTMiDAStIvBOMO9YUeBOZo6uHYvR0KpTt+tLiQhOnFE=' 
WHERE 
  key_id = '62b26ff0933a92b4b6f8e353d26e2f2d14da85aabf3e44f688220e0d1d89c671' 
  AND (
    token = 'eTMiDAStIvBOMO9YUeBOZo6uHYvR0KpTt+tLiQhOnFE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049