UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'k/wBYdfVbOtJL1HEQCminJtskNCyw6TrqHOIyBGu+u0=' 
WHERE 
  key_id = '71a60a8355ebdab84acb18ebd73e1cffd66506ff2f6c00cb9085a7398f116d4e' 
  AND (
    token = 'k/wBYdfVbOtJL1HEQCminJtskNCyw6TrqHOIyBGu+u0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00016