UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'c1+ntrh2dTNy6wCsA2J/74ajXjw8IhUMFs72C2s0eDY=' 
WHERE 
  key_id = '44c58f8a66cc7854bac3f1f292eaf55a987d4ece530ad5c7f147d8d6a63e7a31' 
  AND (
    token = 'c1+ntrh2dTNy6wCsA2J/74ajXjw8IhUMFs72C2s0eDY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00032