UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V+rxxasYrVPtYZAgwwGmlc39smqTwAkVZIkPmhgLxGs=' 
WHERE 
  key_id = '33712395a2bd2a003f20c243d05566eeb75ec69c5cb812249b57583d0a87357e' 
  AND (
    token = 'V+rxxasYrVPtYZAgwwGmlc39smqTwAkVZIkPmhgLxGs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051