UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'TqzF9oqu6OhSDObAUKeP/kPE97yB8LXnGvfP/E1iT8Y=' 
WHERE 
  key_id = '41ae56f4e01a9e222fd6513d327085fcc3b3f00d8705982381a2dd0a97f695bd' 
  AND (
    token = 'TqzF9oqu6OhSDObAUKeP/kPE97yB8LXnGvfP/E1iT8Y=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033