UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '/4DFA6qW657e+r08DXqC2lKGjJL0QgVgWPrklqReTyU=' 
WHERE 
  key_id = 'ca27a7fcbb39ab5ee76e51901b8024ea536ef694aae13df6d2927d35624a7298' 
  AND (
    token = '/4DFA6qW657e+r08DXqC2lKGjJL0QgVgWPrklqReTyU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050