UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'lN6+SJCrFsZWg7gQVSeYCRzPeSkTc0bJdFwriAxm8OQ=' 
WHERE 
  key_id = 'aab3d067e257ea63dbc056ceaa789f2a2581f6dbd5d9b660f4baecfb2e0a956a' 
  AND (
    token = 'lN6+SJCrFsZWg7gQVSeYCRzPeSkTc0bJdFwriAxm8OQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00046