UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'm9nl3ZxhMs7TtLej6mqvBn/Tb7sBew89eixBI3CCsAg=' 
WHERE 
  key_id = '106b6c09d98b1f80d6a075eb8b436e95a7bed71b022d9033b5dea0d2422053c5' 
  AND (
    token = 'm9nl3ZxhMs7TtLej6mqvBn/Tb7sBew89eixBI3CCsAg=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054