UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'igM7mKPQ4X+r3WbZGf3X+JoHyEwOnBJ8kG4IdvbWXVQ=' 
WHERE 
  key_id = '30c08f5de1de5b90c038372d55a9a9630cbe0aa16fd9209a8c130a3dd81e75d9' 
  AND (
    token = 'igM7mKPQ4X+r3WbZGf3X+JoHyEwOnBJ8kG4IdvbWXVQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00047