UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '10IpNtWcvKUgG8TlP1PDA7tEkBDU+moINDrHfPGnZa4=' 
WHERE 
  key_id = 'c4e0668edd3ca4c2959893805054d5cdc771bfa237f573ddce76130fcf1bf3c6' 
  AND (
    token = '10IpNtWcvKUgG8TlP1PDA7tEkBDU+moINDrHfPGnZa4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020